package cn.bulibuqi.myblog.dao;

import cn.bulibuqi.myblog.bean.Tag;
import cn.bulibuqi.myblog.bean.Type;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author bulibuqi
 * @create 2021-12-15:44
 */
@Mapper
public interface TagMapper extends BaseMapper<Tag> {

//    @Select("SELECT * FROM `type` where ${ew.sqlSegment}")
//    List<Type> getTypeList(@Param("ew") QueryWrapper wrapper);


//    SELECT * FROM `blog_tag` JOIN `blog`  ON blog_tag.`blog_id`=`blog_tag`.`blog_id` WHERE `blog`.`id`=1`


//
//    @Select("SELECT * FROM blog_tag " +
//            "JOIN blog  ON blog_tag.blog_id=blog_tag.blog_id " +
//            "WHERE blog.id=#{blogId}")
//    List<Tag> getBlogOfTag(String blogId);


}
